﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div>
    <div id="RealAdBox" class="ctl38_HeaderContainer">
        <ul class="RealelstateNewTab">
            <li onclick="TabRealClick('TabRealconten1');" style="width:140px" ><h2><a><span>Dư Phòng Cho Share</span></a></h2></li>
            <li onclick="TabRealClick('TabRealconten2');" style="width:90px" ><h2><a><span>Cho thuê</span></a></h2></li>
            <li onclick="TabRealClick('TabRealconten3');" style="width:90px" ><h2><a><span>Nhà đất bán</span></a></h2></li>
            <li onclick="TabRealClick('TabRealconten4');" ><h2><a><span>Nhà đất theo danh mục</span></a></h2></li>
        </ul>
    </div>
    <div style="clear: both;"></div>
    <div id="TabRealconten1">
        <%Html.RenderAction("TabReals", "Realelstate", new { Id = 14 });%>
    </div>
    <div id="TabRealconten2" style="display:none"></div>
    <div id="TabRealconten3" style="display:none"></div>
    <div id="TabRealconten4" style="display:none"></div>
</div>
 <script type="text/javascript">
     function TabRealClick(id) {
         if (id == 'TabRealconten1') {
            document.getElementById(id).style.display = 'block';
            $("#" + id).html("<div class=\"product-list tin-danh-cho-ban\"><div style=\"text-align:center; padding:20px 0px 20px 0px; \"> <img src=\"/Images/LoadProgress.gif \" /></div></div>");
            LoadTabReals('14', id);
            document.getElementById('TabRealconten2').style.display = 'none';
            document.getElementById('TabRealconten3').style.display = 'none';
            document.getElementById('TabRealconten4').style.display = 'none';
        }
        if (id == 'TabRealconten2') {
            LoadTabReals('1213', id);
            document.getElementById(id).style.display = 'block';
            $("#" + id).html("<div class=\"product-list tin-danh-cho-ban\"><div style=\"text-align:center; padding:20px 0px 20px 0px; \"> <img src=\"/Images/LoadProgress.gif \" /></div></div>");
            document.getElementById('TabRealconten1').style.display = 'none';
            document.getElementById('TabRealconten3').style.display = 'none';
            document.getElementById('TabRealconten4').style.display = 'none';
        }
        if (id == 'TabRealconten3') {
            LoadTabReals('2310', id);
            document.getElementById(id).style.display = 'block';
            $("#" + id).html("<div class=\"product-list tin-danh-cho-ban\"><div style=\"text-align:center; padding:20px 0px 20px 0px; \"> <img src=\"/Images/LoadProgress.gif \" /></div></div>");
            document.getElementById('TabRealconten1').style.display = 'none';
            document.getElementById('TabRealconten2').style.display = 'none';
            document.getElementById('TabRealconten4').style.display = 'none';
        }
        if (id == 'TabRealconten4') {
            document.getElementById(id).style.display = 'block';
            $("#" + id).html("<div class=\"product-list tin-danh-cho-ban\"><div style=\"text-align:center; padding:20px 0px 20px 0px; \"> <img src=\"/Images/LoadProgress.gif \" /></div></div>");
            LoadTabRealCategory('1');
            document.getElementById('TabRealconten1').style.display = 'none';
            document.getElementById('TabRealconten2').style.display = 'none';
            document.getElementById('TabRealconten3').style.display = 'none';
        }
    }
</script>
